import re
class Gene():
    def __init__(self):
        file = open("genename.txt")
        self.d ={}
        for i in file:
            m = re.search("(\w+)\t(\w+)", i)
            self.d.update({m.group(2) : m.group(1)})

    def return_name(self, id):
        try:
            return  self.d[id]
        except:
            pass
        finally:
            pass
        

Gene()
